import 'package:json_annotation/json_annotation.dart';

part 'config_data.g.dart';

@JsonSerializable()
class ConfigData {
  final int? id;
  final List<ConfigModel>? list;

  const ConfigData({
    this.id,
    this.list,
  });

  factory ConfigData.fromJson(Map<String, dynamic> json) =>
      _$ConfigDataFromJson(json);

  Map<String, dynamic> toJson() => _$ConfigDataToJson(this);
}

@JsonSerializable()
class ConfigModel {
  final String? configJson;
  final int? type;
  final int? id;

  const ConfigModel({
    this.configJson,
    this.type,
    this.id,
  });

  factory ConfigModel.fromJson(Map<String, dynamic> json) =>
      _$ConfigModelFromJson(json);

  Map<String, dynamic> toJson() => _$ConfigModelToJson(this);
}
